package com.example.mybatisplus.dto;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.mybatisplus.enums.TypeName;
import com.example.mybatisplus.typehandler.TestTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Accessors(chain = true)
public class TestTypeHandlerDTO {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    @TableField(keepGlobalFormat = true)
    private TypeName otherName;
    @TableField
    private Date otherCreateTime;

    @Override
    public String toString() {
        return "TestTypeHandlerDTO{" +
                "id=" + id +
                ", otherName=" + otherName +
                ", otherCreateTime=" + otherCreateTime +
                '}';
    }
}
